<html>
<head><meta charset="utf-8"><title>hrtb · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html">hrtb</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228120732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228120732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228120732">(Feb 28 2021 at 10:14)</a>:</h4>
<p>Can someone please answer me if HRTB needs work on chalk? I have been running into an issue (explained at <a href="https://users.rust-lang.org/t/storing-async-functions-which-have-references-possibly-hrtb-related/56262">https://users.rust-lang.org/t/storing-async-functions-which-have-references-possibly-hrtb-related/56262</a>). Searching around on the web, I get some references that it needs work in chalk. But I seem to be missing the information on what HRTB is in first place and why it doesn't work right now.</p>



<a name="228120765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228120765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228120765">(Feb 28 2021 at 10:15)</a>:</h4>
<p>Would really appreciate if someone can help me. And if it needs work in chalk, I will gladly implement that</p>



<a name="228121432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228121432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228121432">(Feb 28 2021 at 10:28)</a>:</h4>
<p>Docs on HRTB: <a href="https://doc.rust-lang.org/nomicon/hrtb.html">https://doc.rust-lang.org/nomicon/hrtb.html</a></p>



<a name="228121576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228121576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228121576">(Feb 28 2021 at 10:31)</a>:</h4>
<p>I'm not sure whether HRTB's are fully supported in chalk, but even if they are, that would mean that it would have to wait on chalk integration into rustc first</p>



<a name="228121824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228121824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228121824">(Feb 28 2021 at 10:36)</a>:</h4>
<p>As to why it currently doesn't work in rustc: that mostly comes down to the current implementation being too limited, to the point that chalk integration might be less work than refactoring the current rustc implementation</p>



<a name="228122119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228122119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228122119">(Feb 28 2021 at 10:40)</a>:</h4>
<p>(sorry if that's too vague, I'm not familiar with the details of the rustc implementation)</p>



<a name="228132062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228132062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228132062">(Feb 28 2021 at 13:54)</a>:</h4>
<p><span class="user-mention" data-user-id="125131">@detrumi</span> Thanks. I am still a bit confused on what the limitation in my above example is.</p>



<a name="228132273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/hrtb/near/228132273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pksunkara <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/hrtb.html#228132273">(Feb 28 2021 at 13:59)</a>:</h4>
<p>Current HRTB implementation works for some naive use cases but not the one from the above example?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>